package com.wao.editor.web.rest;

import com.wao.editor.service.ActionEnter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/api/ueditor")
public class UeditorResource {

    @Autowired
    private ActionEnter actionEnter;

    @ResponseBody
    @RequestMapping(value = "/upload", produces = {"text/javascript"})
    public String exe(HttpServletRequest request) {
        return actionEnter.exec(request);
    }

}
